XendDomain.POWER_STATE_NAMES[dom.state]])
from xen.xend.server import tpmif
tpmif.destroy_vtpmstate(dom.getName())
- return xen_api_success(True)
+ return xen_api_success_void()
else:
return xen_api_error(['HANDLE_INVALID', 'VM', vtpm_struct['VM']])
FAIL("1. Virtual TPM is not working correctly on /dev/vtpm on backend side: \n%s" % run["output"])
try:
- rc = session.xenapi.VTPM.destroy(vtpm_uuid)
+ session.xenapi.VTPM.destroy(vtpm_uuid)
#Should never get here
FAIL("Could destroy vTPM while VM is running")
except:
FAIL("Could not suspend VM")
try:
- rc = session.xenapi.VTPM.destroy(vtpm_uuid)
+ session.xenapi.VTPM.destroy(vtpm_uuid)
#May not throw an exception in 'suspend' state
except:
pass
domain.stop()
-rc = session.xenapi.VTPM.destroy(vtpm_uuid)
-if not rc:
+try:
+ session.xenapi.VTPM.destroy(vtpm_uuid)
+except:
FAIL("Could NOT destroy vTPM while domain is halted.")
domain.destroy()